import request from '@/utils/request'

// 机构相关接口

// 获取行政机构信息
export function getBranchesList(params) {
  return request({
    url: '/areas/children',
    method: 'get',
    params
  })
}

// 获取机构树状结构
export function getBranchesTree() {
  return request({
    url: '/business-hall/tree',
    method: 'get'
  })
}

// 获取机构详情
export function getBranchesDetail(id) {
  return request({
    url: `/business-hall/${id}`,
    method: 'get'
  })
}

// 编辑机构
export function editBranches(data) {
  return request({
    url: '/business-hall',
    method: 'post',
    data
  })
}
